//
// Created by 谢哲 on 2021/5/8.
//

#include <iostream>
#include <vector>
using namespace std;

int main() {
    int A, B, C;
    cin >> A >> B >> C;

    bool flag = false;
    for (int i=1; i<=9; ++i) {
        for (int j=1; j<=9; ++j) {
            for (int k=1; k<=9; ++k) {
                if (i==j||i==k||j==k) continue;
                int a = i*100 + j*10 + k;
                if (a%A!=0) continue;
                int b = a/A*B, c = a/A*C;
                if(b>=1000||c>=1000) continue;

                vector<bool> vdata(10, false);
                vdata[0] = true;
                vdata[i] = true, vdata[j] = true, vdata[k] = true;
                if (!vdata[b%10]) vdata[b%10] = true;
                else continue;
                if (!vdata[(b/10)%10]) vdata[(b/10)%10] = true;
                else continue;
                if (!vdata[(b/100)]) vdata[(b/100)] = true;
                else continue;
                if (!vdata[c%10]) vdata[c%10] = true;
                else continue;
                if (!vdata[(c/10)%10]) vdata[(c/10)%10] = true;
                else continue;
                if (!vdata[(c/100)]) vdata[(c/100)] = true;
                else continue;
                flag = true;
                cout << a << " " << b << " " << c << "\n";
            }
        }
    }

    if (!flag) cout << "No!!!";

    return 0;
}